import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../controllers/fission_controller.dart';
import '../widgets/fission_earnings.dart';
import '../widgets/invitation_links.dart';
import '../widgets/invitation_history.dart';

class FissionPage extends StatelessWidget {
  const FissionPage({super.key});

  @override
  Widget build(BuildContext context) {
    // 初始化裂变控制器
    Get.put(FissionController());

    return Container(
      decoration: BoxDecoration(
        image: DecorationImage(
          image: AssetImage("assets/images/pic_contract_bg.png"),
          fit: BoxFit.fill,
        ),
      ),
      child: SingleChildScrollView(
        child: Column(
          children: [
            SafeArea(bottom: false, child: Container()),

            // 裂变收益组件
            const FissionEarnings(),

            // 邀请链接组件
            const InvitationLinks(),

            // 邀请历史组件
            const InvitationHistory(),

            SizedBox(height: 20.h),
          ],
        ),
      ),
    );
  }
}
